<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript" src="/testmybatis/jquery-2.2.4.min.js"></script>

</head>
<body>
	<div id="tips"></div>
	<table>
		<tr>
			<td>用户名</td>
			<td><input id="userName"></td>
		</tr>
		<tr>
			<td>密码</td>
			<td><input type="password" id="password" /></td>
		</tr>
		<tr>
			<td>再次输入密码</td>
			<td><input type="password" id="password_1" /></td>
		</tr>
		<tr>
			<td>
				<button id="regin">注册</button>
			</td>
		</tr>
	</table>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#regin").click(function() {
				$.ajax({
					url:"regin",
					type : "post",
					data: {
						username: $("#userName").val(),
						password: $("#password").val(),
						password_1: $("#password_1").val()
					},
					dataType : "json",
					success : function(data){
						$("#tips").empty().append(data);
					}
					
				});
			});
			
		});
		

		

	</script>
</body>
</html>